var profileVUE=null;
$(function () {
    profileVUE = new Vue({
        el: '#profileDIV',
        data: {
            groups:[],
            joinGroups:[]
        },
        methods:{
            editGroup:function(id){
                updateAction(id)
            },
            openGroup:function(id){
                window.location.href="/group/"+id+".html";
            },
            delGroup:function(id){
                delAction(id);
            }
        },
        created:function(){
            var _this = this;
            $.getJSON(indexListURL,{"type":1},function(resp){
                if (resp.code != "0000") {
                    showMessage(resp.code || resp.desc, "error");
                } else {
                    _this.groups=resp.data.mine;
                    _this.joinGroups=resp.data.joins;
                }
            })
        }
    });
})